This thread about downsampling external images on the fly is a really helpful
feature! Thanks, Hraban for sharing the code!
I was wondering if it was possible to downscale also raster images embedded in
pdf/svg files loaded via \externalfigure?
I found a ghostscript solution online
Am 02.09.22 um 10:39 schrieb Keith McKay via ntg-context:
Thanks for this code Hraban. I tried this last night and it worked
really well. I did have one stumbling block when I noticed that those
image files with a space in their names were not found, however
renaming without a space solved
y.
>
> But you can use it with the attached lua file like:
>
>
> \loadluafile[grph-downsample]
> \doifmodeelse{print}{%
> \def\Resolution{300}
> }{%
> \def\Resolution{96}
> }%
>
>
\Resolution{96}
}%
\setupexternalfigures[
%directory={./Logos,img},
conversion=lowres.jpg,
resolution=\Resolution,
]
With the script I get strange results. I am not sure whether the
resolution is correctly calculated.
And I am wondering what the script is doing with png files.
This one
Am 01.09.22 um 12:37 schrieb juh+ntg-context--- via ntg-context:
Hi Hraban,
Am 01.09.22 um 10:56 schrieb Henning Hraban Ramm via ntg-context:
\startluacode
local function downsampler(oldname, newname, resolution)
if not resolution or resolution == "" then
resolution = 72
end
Am 01.09.22 um 13:43 schrieb juh+ntg-context--- via ntg-context:
Am 01.09.22 um 10:51 schrieb Henning Hraban Ramm via ntg-context:
\loadluafile[grph-downsample]
\doifmodeelse{print}{%
\def\Resolution{300}
}{%
\def\Resolution{96}
}%
\setupexternalfigures[
%directory={./Logos,img
Am 01.09.22 um 10:51 schrieb Henning Hraban Ramm via ntg-context:
\loadluafile[grph-downsample]
\doifmodeelse{print}{%
\def\Resolution{300}
}{%
\def\Resolution{96}
}%
\setupexternalfigures[
%directory={./Logos,img},
conversion=lowres.jpg,
resolution=\Resolution
Hi Hraban,
Am 01.09.22 um 10:56 schrieb Henning Hraban Ramm via ntg-context:
\startluacode
local function downsampler(oldname, newname, resolution)
if not resolution or resolution == "" then
resolution = 72
end
local cmd = string.format(
[[gm convert -resample
Am 01.09.22 um 10:51 schrieb Henning Hraban Ramm via ntg-context:
Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context:
Hi,
what is resolution meant to do?
What am I missing?
The resolution parameter is still not used by default ConTeXt, sorry.
But you can use it with the
?
The resolution parameter is still not used by default ConTeXt, sorry.
But you can use it with the attached lua file like:
\loadluafile[grph-downsample]
\doifmodeelse{print}{%
\def\Resolution{300}
}{%
\def\Resolution{96}
}%
\setupexternalfigures[
%directory={./Logos,img},
conversion
Hi,
what is resolution meant to do?
Whatever I insert as resolution, I get no change.
\setupexternalfigure[location={default,local},resolution=30]
\starttext
\externalfigure[hacker]
\stoptext
What am I missing?
TIA
juh
The setupexternalfigures seems to be broken. In the example below, the first
\placefigure doesnt work, but the second with the entire path does.
I'm running the latest minimals via the GUI installer on winxp.
Best regards
Reimund Trost
Example:
% mptest.tex:
\starttext
\setupcolors [state
On 19-5-2010 3:28, Reimund Trost wrote:
The setupexternalfigures seems to be broken. In the example below, the first
\placefigure doesnt work, but the second with the entire path does.
I'm running the latest minimals via the GUI installer on winxp.
in the beta i get two graphics
On Wed, Jan 13 2010, Hans Hagen wrote:
ok, i can fix that but there is a problem ...
if no suffix is given, the quality list is followed and the first request
will be
http://pmrb.free.fr/tmp/hacker-test.pdf
which gives a home page which is no pdf of course and luatex does not like
that
On 14-1-2010 0:04, Aditya Mahajan wrote:
Of course, this will only work for moudles that provide only one file.
you can pick up the test version and play with ...
\enabletrackers[modules.loading]
\input
On 14-1-2010 9:18, Peter Münster wrote:
On Wed, Jan 13 2010, Hans Hagen wrote:
ok, i can fix that but there is a problem ...
if no suffix is given, the quality list is followed and the first request
will be
http://pmrb.free.fr/tmp/hacker-test.pdf
which gives a home page which is no pdf of
On 7-1-2010 10:14, Peter Münster wrote:
Hello,
This used to work:
\setupexternalfigures[directory={\currentvalue, http://pmrb.free.fr/tmp/}]
\starttext
\externalfigure[hacker-test]
\stoptext
But with the latest version, the figure is not found...
ok, i can fix that but there is a problem
On Wed, 13 Jan 2010, Hans Hagen wrote:
On 7-1-2010 10:14, Peter Münster wrote:
Hello,
This used to work:
\setupexternalfigures[directory={\currentvalue, http://pmrb.free.fr/tmp/}]
\starttext
\externalfigure[hacker-test]
\stoptext
But with the latest version, the figure is not found...
ok
Hello,
This used to work:
\setupexternalfigures[directory={\currentvalue, http://pmrb.free.fr/tmp/}]
\starttext
\externalfigure[hacker-test]
\stoptext
But with the latest version, the figure is not found...
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact
On 7-1-2010 10:14, Peter Münster wrote:
Hello,
This used to work:
\setupexternalfigures[directory={\currentvalue, http://pmrb.free.fr/tmp/}]
\starttext
\externalfigure[hacker-test]
\stoptext
But with the latest version, the figure is not found...
hm, i didn't realize that one would put
Peter Münster wrote:
Hello,
In the following example, the image is always taken from d1:
% engine=luatex
\setupexternalfigures[directory=d1]
\setupexternalfigures[directory={d2,\currentvalue}] % does not seem to work
\starttext
\externalfigure[image]
\stoptext
fixed in next beta
Hello,
In the following example, the image is always taken from d1:
% engine=luatex
\setupexternalfigures[directory=d1]
\setupexternalfigures[directory={d2,\currentvalue}] % does not seem to work
\starttext
\externalfigure[image]
\stoptext
Cheers, Peter
--
http://pmrb.free.fr/contact
luigi scarso wrote:
Same problem with
ConTeXt ver: 2008.03.24 23:24 MKIV fmt: 2008.3.25 int: english/english
This is LuaTeX, Version snapshot-0.25.1-2008032510
I am convinced this is not related to the version of the executable.
All file discovery is carried out by Hans' lua code.
Best
On Wed, Mar 26, 2008 at 9:19 AM, Taco Hoekwater [EMAIL PROTECTED] wrote:
I am convinced this is not related to the version of the executable.
All file discovery is carried out by Hans' lua code.
I have sent some logs offlist to Hans
--
luigi
it's new .
it's powerful .
it's luatex .
Same problem with
ConTeXt ver: 2008.03.24 23:24 MKIV fmt: 2008.3.25 int: english/english
This is LuaTeX, Version snapshot-0.25.1-2008032510
___
If your question is of interest to others as well, please add an entry
On Tue, Mar 18, 2008 at 11:18 PM, luigi scarso [EMAIL PROTECTED] wrote:
setupexternalfigures seems broken on
ConTeXt ver: 2008.03.11 23:55 MKIV fmt: 2008.3.18 int: english/english
This is LuaTeX, Version snapshot-0.25.0-2008031821
I'm only able to include images from current dir.
Same
Maybe I can do better
I still have this in a production line
This is LuaTeX, Version snapshot-0.20.2-2008010918
ConTeXt ver: 2008.01.11 12:09 MKIV fmt: 2008.1.14 int: english/english
and there are no problems with setupexternalfigures
If you tell me how, I can make a configuration summary
luigi scarso wrote:
On Tue, Mar 18, 2008 at 11:24 PM, Thomas A. Schmitz
[EMAIL PROTECTED] wrote:
On Mar 18, 2008, at 11:18 PM, luigi scarso wrote:
setupexternalfigures seems broken on
ConTeXt ver: 2008.03.11 23:55 MKIV fmt: 2008.3.18 int: english/
english
This is LuaTeX
setupexternalfigures seems broken on
ConTeXt ver: 2008.03.11 23:55 MKIV fmt: 2008.3.18 int: english/english
This is LuaTeX, Version snapshot-0.25.0-2008031821
I'm only able to include images from current dir.
--
luigi
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
On Tue, Mar 18, 2008 at 11:24 PM, Thomas A. Schmitz
[EMAIL PROTECTED] wrote:
On Mar 18, 2008, at 11:18 PM, luigi scarso wrote:
setupexternalfigures seems broken on
ConTeXt ver: 2008.03.11 23:55 MKIV fmt: 2008.3.18 int: english/
english
This is LuaTeX, Version snapshot-0.25.0
On Mar 18, 2008, at 11:18 PM, luigi scarso wrote:
setupexternalfigures seems broken on
ConTeXt ver: 2008.03.11 23:55 MKIV fmt: 2008.3.18 int: english/
english
This is LuaTeX, Version snapshot-0.25.0-2008031821
I'm only able to include images from current dir.
Seems to work here
Hello,
the sample file hacker.jpg is only found by \externalfigure[hacker]
when using \setupexternalfigures[location=global] but not with
\setupexternalfigures[location={global,local}] nor with
\setupexternalfigures[location={local,global}]
Do I misunderstand perhaps the location-option
32 matches
Mail list logo